<template>
  <div id="details">
    <!-- 工具条 -->
    <div class="br-tool" @click="$router.go(-1)">
      <p class="br-tool-p1"><van-icon name="arrow-left" /></p>
    </div>
    <!-- 商品详情 -->
    <div class="content" v-for="(item,index) in details" :key="index">
      <div class="top">
        <img :src="item" alt="" />
        <p></p>
        <p></p>
        <button></button>
      </div>
      <!-- 商品简介 -->
      <div class="info">

      </div>
      <!-- 商品评价 -->
      <div class="ratings">

      </div>
    </div>
    <!--底部  -->
    <div id="foot">
      <p class="br-car">
        <img src="./image/car.png" alt="" />
      </p>
      <p class="br-money">
        <span class="price">￥0</span>
        <span>另需配送费￥4元</span>
      </p>
      <button>￥20起送</button>
    </div>
  </div>
</template>


<script>
export default {
  props: [],
  data() {
    return {
      details: [],
    };
  },
  methods: {},
  created() {
    let name = this.$route.query.name;
    this.$http.get("/data.json").then((res) => {
      this.details = res.data.goods.foods;
    });
  },
};
</script>


<style scoped>
#details {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: rgb(214, 214, 214);
}
.br-tool {
  z-index: 1;
  position: fixed;
  top: 0.2rem;
  left: 0.3rem;
  width: 6.9rem;
  height: 0.6rem;
  display: flex;
  justify-content: space-between;
}
.van-icon {
  position: absolute;
  font-size: 40px;
  color: rgb(102, 102, 102);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.br-tool-p1 {
  width: 0.3rem;
  height: 0.3rem;
  border-radius: 50%;
  position: relative;
}
.br-car {
  position: absolute;
  top: -0.3rem;
  left: 0.23rem;
  width: 1rem;
  height: 1rem;
  background: #2b343c;
  border-radius: 50%;
  border: 0.12rem solid #131d26;
}
.br-car img {
  width: 0.41rem;
  height: 0.4rem;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.br-money {
  width: 5.4rem;
  height: 0.86rem;
  font-size: 0.18rem;
  padding-left: 1.6rem;
  color: #919396;
  text-align: center;
  display: flex;
  align-items: center;
}
.br-money span {
  margin-left: 0.2rem;
  font-size: 0.32rem;
  font-weight: bold;
}
button {
  width: 2.1rem;
  height: 0.96rem;
  background: #2b333b;
  border: none;
  font-size: 0.24rem;
  color: #979a9c;
  font-weight: bold;
}
#foot {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0.96rem;
  background: #141d27;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}
</style>